namespace SolidMvvm {
	using System;

	public abstract class ExceptionBase : Exception {
		protected ExceptionBase(string publicMessage, string privateMessageOrNull) : base(publicMessage) {
			PrivateMessageOrNull = privateMessageOrNull;
		}

		protected ExceptionBase(string publicMessage, string privateMessageOrNull, Exception innerException) : base(publicMessage, innerException) {
			PrivateMessageOrNull = privateMessageOrNull;
		}

		public string PrivateMessageOrNull { get; }

		public override string ToString() {
			return "PUBLIC MESSAGE:\n" + Message + "\n\n" + (PrivateMessageOrNull == null ? string.Empty : "PRIVATE MESSAGE:\n" + PrivateMessageOrNull + "\n\n") + "EXCEPTION DETAILS:\n" + base.ToString();
		}
	}
}
